package com.example.bookdemo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.bookdemo.domain.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**MyBatis写法
@Mapper
public interface BookDao {

    @Select("SELECT * FROM tb_book WHERE id=#{id}")
    Book getById(Integer id);

}
*/

/**MyBatisPlus写法
 * BookDao继承自BaseMapper<T>，使用泛型传参
 * */
@Mapper
public interface BookDao extends BaseMapper<Book> {

}